<template>
  <el-row style="height:100%">
    <page>
      <pageheader :isShow="false">
        崇邦用户
      </pageheader>
      <div style="margin: 20px">
        <el-button type="primary" size="small" @click="updata">更新用户</el-button>
<!--        <p style="font-size: 20px;margin-top: 10px;">更新用户: {{user_num}}个</p>-->
      </div>
    </page>
  </el-row>
</template>
<style lang="scss">

</style>
<script>
  import page from "@/components/page/page";
  import pageheader from "@/components/page/pageheader";
  import SearchInput from "@/components/sys/assembly/searchinput";
  import Transfer from "@/components/sys/assembly/transfer";
  import Cascader from "@/components/sys/assembly/elcascader";
  import Moment from "moment";
  export default {
    data() {
      return {
        user_num:0
      };
    },
    components: {
      page,
      pageheader,
    },

    created() {
      this.$Bus.$emit("Loading", false);
    },
    mounted() {
    },
    methods: {
      updata(){
        this.$Bus.$emit("Loading", true);
        let url = '/sso_users/idsmamanger/refresh'
        this.$api.post(url)
        .then(data=>{
          if(data == '10001'){
            this.$message.error('无权操作该数据')
            return
          }
          this.user_num = isNaN(Number(data.data)) ? 0 : Number(data.data)
          this.$message.success('更新成功！')
          this.$Bus.$emit("Loading", false);
        })
        .catch(err=>{
          console.log(err);
          this.$Bus.$emit("Loading", false);
        })
      }
    }
  };


</script>
